From 2b1b3844b2392e06e91488612d5bc7976e3fb24b Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 23 Feb 2007 10:43:00 +0000 Subject: [PATCH] linux: Fix current_vcpu_info for UP case Under !CONFIG_SMP, smp.h is not always included and hence smp_processor_id() not always visible. Signed-off-by: Jan Beulich --- .../include/asm-i386/mach-xen/asm/hypervisor.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h index ffe031b601..1690e2dc33 100644 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h @@ -57,7 +57,11 @@ extern shared_info_t *HYPERVISOR_shared_info; #define vcpu_info(cpu) (HYPERVISOR_shared_info->vcpu_info + (cpu)) +#ifdef CONFIG_SMP #define current_vcpu_info() vcpu_info(smp_processor_id()) +#else +#define current_vcpu_info() vcpu_info(0) +#endif #ifdef CONFIG_X86_32 extern unsigned long hypervisor_virt_start; -- 2.30.2